package com.alpaak.service.impl;

import com.alpaak.dao.UserMapper;
import com.alpaak.domain.User;
import com.alpaak.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author liudongkui
 * @desp TODO
 * @datetime 2018/9/4 10:30
 */
@Service
public class UserServiceImpl implements UserService {
    @Autowired
    private UserMapper userMapper;
    @Override
    public int addUser(User user) {
        return userMapper.insertSelective(user);
    }

    @Override
    public User get(Integer id) {
        return userMapper.selectByPrimaryKey(id);
    }
}
